<html>
	<head>
		<title>{$data.name}</title>
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<link href="http://static.hongdayun.com/public/bootstrap/3.3.5/bootstrap.min.css" rel="stylesheet">
		<script src="http://static.hongdayun.com/public/jquery/2.1.4/jquery.min.js"></script>
		<script src="http://static.hongdayun.com/public/bootstrap/3.3.5/bootstrap.min.js"></script>
		<link href="http://static.hongdayun.com/public/bootstrap/3.3.5/bootstrap.theme.min.css" rel="stylesheet">
		

	</head>
	<body>
	<div class="container-fluid">
	<div class="row">
		<div class="col-md-offset-3 col-md-6">
		<br>
		 <div class="panel panel-default">
  <div class="panel-heading">{$data.name}</div>
  <style>
	.panel-body img{
		max-width:100%;
	}
  </style>
  <script src="http://static.hongdayun.com/static/area/1.0/area.js"></script>
		
		
		<script type="text/javascript">
				var Gid2  = document.getElementById;
				var showArea2 = function(){
					Gid2('show2').innerHTML = "<h3>" + Gid2('a_province').value + " - " + 
											Gid2('a_city').value + " - " + 
											Gid2('a_county').value + "</h3>"
					
				}
				Gid2('a_county').setAttribute('onchange','showArea2()');
		</script>
  <div class="panel-body">
  {$data.value}
  <hr>
   <js href="__ADDON__/ajaxupload/js/jquery.js" />
		<js href="__ADDON__/ajaxupload/js/ajaxupload.js" />
		
		<volist name="file_list" id="file_list">
	  
		 <script type="text/javascript">
		$(function(){
			var button = $('#upload_button_{$file_list.id}'), interval;
			var confirmdiv = $('#uploadphotoconfirm_{$file_list.id}');
			var fileType = "pic",fileNum = "one"; 
			new AjaxUpload(button,{
				action: "__APP__/Home/Upload/Image/Addon/AjaxUpload.html",
				name: 'userfile',
				onSubmit : function(file, ext){
					if(fileType == "pic")
					{
						if (ext && /^(jpg|png|jpeg|gif|JPG)$/.test(ext)){
							this.setData({
								'info': '文件类型为图片'
							});
						} else {
							 confirmdiv.text('文件格式错误，请上传格式为.png .jpg .jpeg 的图片');
							return false;               
						}
					}
								
					confirmdiv.text('文件上传中');
					
					if(fileNum == 'one')
						this.disable();
					
					interval = window.setInterval(function(){
						var text = confirmdiv.text();
						if (text.length < 14){
							confirmdiv.text(text + '.');                    
						} else {
							confirmdiv.text('文件上传中');             
						}
					}, 200);
				},
				onComplete: function(file, response){
					if(response != "success"){
						if(response =='2'){
							confirmdiv.text("文件格式错误，请上传格式为.png .jpg .jpeg 的图片");
						}else{
							
							confirmdiv.text("上传完成");
							
							$("#newbikephotoName_{$file_list.id}").val(response);
							$("#newbikephoto_{$file_list.id}").attr("src",response);	
							$("#imgurl_{$file_list.id}").attr("value",response);						
							
						}
						
					}
										  
					window.clearInterval(interval);
								
					this.enable();
					
					if(response == "success")
					alert('上传成功');              
				}
			});
		});
		</script>
 </volist>
      <form action="__APP__/Home/Index/Create/Addon/ResearchForm.html" method="post" enctype="multipart/form-data">
	  <volist name="list" id="list">
	  {$list.id|getFormHTML}
		
		<br>
	  </volist>
	  
		<hr>
	    <input type="hidden" value="{$id}" name="form_id">
	  <button type="submit" class="btn btn-default" style="width:100%;">提交</button>
		 
</form>
  </div>
</div>
</div>
</div>
</div>
			
			
	</body>
</html>